package com.example.lin.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.lin.entity.pojo.Department;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.lin.entity.vo.DepartmentVo;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 林志豪
 * @since 2024-02-09
 */
public interface DepartmentService extends IService<Department> {

    /**
     * 获取部门列表
     * @param page
     * @param departmentVo
     * @return
     */
    Page<DepartmentVo> pageVo(Page page, DepartmentVo departmentVo);

    /**
     * 获取上级部门
     * @param departments  部门信息
     * @param pid           父级部门ID
     * @return
     */
    List<Department> recursion(List<Department> departments, Integer pid);
}
